#include <iostream>
using namespace std;
void myswap_pass_by_reference(int& a, int &b){
	int t = a;
	a = b;
	b = t;
}
void myswap_pass_by_pointer_value(int* a, int* b){
	int t = *a;
	*a = *b;
	*b = t;
}
int main(){
	int a=1, b=2;
	cout << "originally" << endl;
	cout << "a=" << a << ", b=" << b << endl;
	myswap_pass_by_reference(a, b);
	cout << "after myswap_pass_by_reference" << endl;
	cout << "a=" << a << ", b=" << b << endl;
    myswap_pass_by_pointer_value(&a, &b);
    cout << "after myswap_pass_by_pointer_value" << endl;
    cout << "a=" << a << ", b=" << b << endl;
    return 0;
}

